import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import router from './router'
import App from './App.vue'
import './style.css'
import { useThemeStore } from './stores/theme'

// 创建应用实例
const app = createApp(App)

// 创建 Pinia 实例
const pinia = createPinia()
app.use(pinia)

// 初始化主题
const themeStore = useThemeStore(pinia)
themeStore.initTheme()

// 使用插件
app.use(ElementPlus)
app.use(router)

// 挂载应用
app.mount('#app')
